package com.liusand.common.thread;

import com.liusand.model.pojo.Users;

public class UsersThreadLocal {

    public static ThreadLocal<Users> userIdThreadLocal = new ThreadLocal<>();

    public static Integer getId() {
        return userIdThreadLocal.get().getId();
    }

    public static String getOpenId() {
        return userIdThreadLocal.get().getOpenId();
    }

    public static void set(Users users) {
        userIdThreadLocal.set(users);
    }

    public static void remove() {
        userIdThreadLocal.remove();
    }

}
